home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac: Not for Sale / Another.not.for.sale (Australia).iso / fade into you / being there / How To & FAQ's / using archie < prev    next >
Text File  |  1994-11-09  |  22KB  |  522 lines

  1.  
  2.            A SURAnet guide the Archie service (v1.0.1)
  3.                                by Eric Anderson
  4.  
  5. This document may be converted to another format for use on different 
  6. machines, and aggregated with other files for distribution.  But, 
  7. please do not modify the content; sections of this document should
  8. not be removed or modified.  Please address questions on this policy,
  9. requests for exceptions, comments, or suggestions to archie-admin@sura.net
  10. This document is available from ftp.sura.net as 
  11. pub/archie/docs/SURAnet-archie-guide.txt
  12.  
  13. Table of Contents
  14. ----- -- --------
  15.  
  16. 1.0 Introduction
  17. 2.0 Data Stored In Archie System
  18. 3.0 Searching Through the Database
  19.   3.1 Exact Searches
  20.   3.2 Case Sensitive Searches
  21.     3.2.1 Examples of Case Sensitive Searches
  22.   3.3 Case Insensitive Searches
  23.     3.3.1 Examples of Case Insensitive Searches
  24.   3.4 Regular Expression Searches
  25.     3.4.1 Examples of Regular Expression Searches
  26.     3.4.2 Converting from File Matching Expressions to Archie Regexps
  27.     3.4.3 Examples of Converted File Matching Expressions
  28. 4.0 Different Access Methods
  29.   4.1 Remote Client Access
  30.   4.2 Interactive Interfaces
  31.   4.3 Mail Interface
  32.  
  33. Appendix A: Regular Expressions
  34. A.1 Overview
  35. A.2 Using Regular Expressions
  36. A.3 Matching an arbitrary character
  37. A.4 Matching repeated characters
  38. A.5 Matching strings at the front or back
  39. A.6 Matching a character out of a set of choices
  40. A.7 Forcing special characters to be normal
  41.  
  42. Appendix B: Glossary of Terms
  43.  
  44.  
  45. 1.0 Introduction
  46. --- ------------
  47. The Archie service provides a database of files available for anonymous
  48. ftp, a way of retrieving files that are publicly available on the Internet.  
  49. Users can locate files by searching the Archie database, which is indexed by
  50. the names of the files.  Therefore, users need to know a part of the file's 
  51. name to locate a file using Archie.
  52. This document describes: 
  53.  
  54.   * The data in the archie database, so that people can understand what
  55.     queries will produce useful results;
  56.  
  57.   * The different search methods, with examples;
  58.  
  59.   * The different programs that can search the Archie database;
  60.  
  61.   * A description of Archie regular expressions.
  62.  
  63. 2.0 Data Stored In The Archie System
  64. --- ---- ------ -- --- ------ ------
  65. The Archie system stores the names of files available for anonymous ftp.
  66. Therefore searches of the database need to use the name of the file,
  67. not words associated with the file.  For example, a search for the
  68. dos version of the gnu C compiler requires knowing the name of that
  69. package is djgpp.  The Archie systems acquires the names of files stored at
  70. anonymous ftp sites by ftp-ing to the site and getting a listing of all the 
  71. files stored there, i.e. files indexed in the database use the naming 
  72. conventions of each individual site instead of a common naming convention.
  73.  
  74. To reduce the load on anonymous ftp sites, the Archie system retrieves
  75. the listings of files infrequently.  Different Archie sites have different
  76. policies on how many sites they retrieve and how often they retrieve site 
  77. listings, but usually about 50 listings are retrieved a night. Since there 
  78. are over 1000 sites, each site is updated about once every 20 days.  
  79. Furthermore, the different Archie sites are on different rotations for 
  80. retrieving listings.  Therefore, different sites can return different 
  81. results, and newly added files are unlikely to be indexed in Archie until 
  82. a few days after they are made available.
  83.  
  84.  
  85. 3.0 Searching Through the Database
  86. --- --------- ------- --- --------
  87.  
  88. There are four main ways of searching through the database:
  89.  
  90.   * Exact Searching (exact)
  91.     -- Very fast, returns only exact filename matches
  92.  
  93.   * Case Sensitive Substring Searches (subcase)
  94.     -- Medium fast, returns filenames with the substring in the filename
  95.                                         
  96.   * Case Insensitive Substring Searches (substring)
  97.     -- Medium slow, returns filenames with the substring in any case in
  98.        the filename
  99.   
  100.   * Regular Expressions (regexp)
  101.     -- Slow, returns filenames which match the regular expression anywhere
  102.        in the string
  103.  
  104.   3.1 Exact Searching
  105.   --- ----- ---------
  106.  
  107. Exact searching is useful if the name of the desired program is known, and
  108. the user is looking for the closest copy.
  109. For example, a search for version 2.09 of xarchie using the string
  110. xarchie-2.0.9.tar.gz would find the file on 15 different hosts spread across
  111. the world.  A search for the same file using the string 
  112. xarchie-2.0.9.tar.Z would find the file on 25 different hosts.
  113.  
  114.   3.2 Case sensitive substring searching (subcase)
  115.   --- ---- --------- --------- --------- ---------
  116.  
  117. Subcase searching is useful if part of the filename is known, but (for 
  118. example) not the most current version.  Subcase searching is more precise
  119. than substring searching if the case of the part of the filename is known;
  120. subcase searching will reduce the number of irrelevant matches. A search 
  121. for the most recent version of the TeX package could use the search string 
  122. TeX, which would find files which have the string TeX in them, but not those 
  123. with only the string tex in them.
  124.  
  125.  
  126.     3.2.1 Examples of Case Sensitive Searches
  127.     ----- -------- -- ---- --------- --------
  128.  
  129. Search String   Returned Names
  130. ------ ------   -------- -----
  131.   TeX-          TeX-3.14.tar.gz, SeeTex-2.18.5.tar.Z, TeX-index, 
  132.                 GETTING-TeX-FILES, ...
  133.   gcc-2.5       gcc-2.5.0-2.5.0a.diff.gz, gcc-2.5.0.tar.gz, gcc-2.5.2.tar.gz,
  134.                 gcc-2.5.0-cpp.ps.gz, gcc-2.5.3.tar.gz, not.gcc-2.5.0.tar.gz, 
  135.                 gcc-2.5.0-2.5.1.diff, ...
  136.         
  137.  
  138.   3.3 Substring Searching
  139.   --- --------- ---------
  140.  
  141. Substring searching is useful if a portion of the filename is known, but not
  142. the most current version or the case of the filename. In the previous example
  143. of searching for TeX, a substring search would find filenames with either TeX 
  144. or tex in them.
  145.  
  146.     3.3.1 Examples of Case Insensitive Searches
  147.     ----- -------- -- ---- ----------- --------
  148.  
  149. Search String   Returned Names
  150. ------ ------   -------- -----
  151.   tex           macros.tex, bib.tex, README.TeX, syd.tex, LNM.tex, ...
  152.   TeX           macros.tex, bib.tex, README.TeX, syd.tex, LNM.tex, ...
  153.   TeX-          revtex-30.hqx, videotex-terminal-tool.hqx, latex-style,
  154.                 jtex-1.43-1.44.tar.gz, jtex-util.tar.Z, psfig-tex-1.4.tar.Z, 
  155.                 bibtex-style, latex-style-misc.ann, ...
  156.   xf-2          Announcing-XF-2-2.z, xf-2.2.tar.gz, announcing-xf-2-2, ...
  157.   
  158.   3.4 Regular Expression Searches
  159.   --- ------- ---------- --------
  160.  
  161. Regular expressions allow specifying that the filename begin with a specific
  162. string, or specifying two sections of the filename separated by some unknown
  163. characters. Regular expressions are different from file matching expressions 
  164. used by the shell at the command line; a conversion process is provided in
  165. section 3.4.2. A complete description of archie regular expressions is in
  166. Appendix A.
  167.  
  168.     3.4.1 Examples of Regular Expressions Searches
  169.     ----- -------- -- ------- ----------- --------
  170.  
  171. Searching for complete distributions of emacs 19:
  172.   ^emacs.*19[^-]*\.tar
  173.                     Which will find filenames starting with emacs, having
  174.                     19 somewhere after that, and then any character but a -
  175.                     until a .tar , i.e.: emacs-19.15.tar.gz, 
  176.                     emacs-19.16.tar.gz, emacs-19.17.tar.gz, ... 
  177.                    
  178. Searching for diffs between versions of emacs 19:
  179.   ^emacs.*19.*-.*\.tar
  180.                     Which will find filenames starting with emacs, having
  181.                     19 somewhere after that, then a dash somewhere after that
  182.                     and finally a .tar , i.e: emacs-19.16-A.bin.tar.gz,
  183.                     emacs-19.16-alpha.src.tar.Z, emacs-19.15-A.el.2of2.tar.gz,
  184.                     emacs-19.15-A.bin.tar.gz, ...
  185.  
  186. Since the above expression didn't do what I expected:
  187.   ^emacs.*19\.[0-9].*-.*[0-9][0-9]
  188.                     Which find filenames starting with emacs, having 
  189.                     19.<digit> somewhere after that, then separated by some 
  190.                     number of characters, a dash, then some more characters,
  191.                     then two digits, which matches: emacs-19.12-19.13.diff.gz,
  192.                     emacs-19.11-19.12.diff.gz, emacs-19.10-19.11.diff.gz, ...
  193.  
  194. Searching for a tar version of a package:
  195.   ^xce.*tar         Which will find filenames starting with xce and having
  196.                     tar somewhere after that, for example xce-1.00.tar.Z,
  197.                     xcell.tar.z and xce.tar.gz
  198.  
  199. Searching for current sun bug fixes:
  200.   [0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9]\.tar
  201.                     Which will find filenames which consist of six digits,
  202.                     then a dash, two digits, a period and then the string
  203.                     tar, for example 100075-09.tar.Z and 100149-03.tar.Z
  204.  
  205. Searching for the third major revision of xv:
  206.   ^xv.*3.*tar       Which will find filenames starting with xv, some
  207.                     number of characters, the number three, some number
  208.                     of characters and then the string tar, for example,
  209.                     xv-3.00.tar.gz, xv-2.21.386bsd.bin.tar.Z, and
  210.                     xview-3.part3.tar.gz
  211.  
  212. A better version of the above:
  213.   ^xv-3\..*tar      Which forces the first five characters to be xv-3., and
  214.                     then the string tar at some point later.  Which finds:
  215.                     xv-3.00a.tar.Z and xv-3.00.tar.Z
  216.  
  217.     3.4.2 Converting from File Matching Expressions to Archie Regexps
  218.     ----- ---------- ---- ---- -------- ----------- -- ------ -------
  219.  
  220. File matching expressions, or file globs, are typed in to the shell or 
  221. command line to match filenames.  Common examples are *.txt, *.exe, x*, 
  222. p*.zip, etc. The following rules should convert file globs to Archie 
  223. regexps. An explanation of what each symbol does can be found in Appendix A.
  224.  
  225. 1. Prepend ^ to the file glob, and $ to the end 
  226.  
  227. 2. Replace all occurrences of . with \.
  228.  
  229. 3. Replace all single character matches, such as ? with .
  230.  
  231. 4. Replace all multiple character matches, e.g. * with .*
  232.  
  233. Note that regular expression matches are case sensitive.  If arbitrary
  234. cases for each letter should match, then each letter needs to be replaced 
  235. with the upper and lower case versions of that letter in brackets.  E.g. 
  236. replace b with [bB]
  237.  
  238. If a command line interface is used for searching, then single quotes (')
  239. probably need to surround the regular expression argument.
  240.  
  241. If neither the single nor multiple character matches have been used, then
  242. the search can probably be performed using a substring or subcase search,
  243. which should be faster than the regular expression search.
  244.  
  245.     3.4.3 Examples of Converted File Matching Expressions
  246.     ----- -------- -- --------- ---- -------- -----------
  247.  
  248. File Expression                Archie Regexp
  249. ---- ----------                ------ ------
  250. *.txt                          ^.*\.txt$
  251. *.exe                          ^.*\.exe$
  252. x*                             ^x.*$
  253. p*.zip                         ^p.*\.zip$
  254.  
  255.  
  256. 4.0 Different access methods
  257. --- --------- ------ -------
  258.  
  259. The Archie database resides on a number of different machines on the Internet.
  260. A server on each machine allows users to query the database from their 
  261. machines.  Clients programs are programs which contact the server to
  262. search the database.  By separating the client from the server, the load
  263. on the server is reduced, allowing faster processing of the searches.
  264.  
  265.   4.1 Remote Client Access
  266.   --- ------ ------ ------
  267.  
  268. Remote client access is the preferred method to access the database.  Since 
  269. the Archie machine must only process the query, it has to do much less work 
  270. than if the telnet or mail interfaces are used. This is especially true for 
  271. version 2.X of the Archie system which handles interactive and mail queries 
  272. very inefficiently.
  273.  
  274. All version numbers and locations are the best sites I know as of 
  275. Nov 14, 1993.  Archie can be used to locate newer versions, or find copies 
  276. which are stored closer to your site.  As the clients are updated, 
  277. the version numbers will change.  Therefore, after finding where a copy
  278. of the programs are stored, check to make sure that the most recent version
  279. is retrieved.
  280.  
  281. There are two main programs which provide client access, the c-archie client
  282. and the xarchie program.  There is a version of the c-archie client which has
  283. been compiled for VMS machines.
  284.  
  285. The c-archie client can be retrieved from ftp.sura.net as
  286. pub/archie/clients/c-archie-1.4.1-FIXED.tar.Z
  287.  
  288. The VMS version of the c-archie client can be retrieved from ftp.sura.net as
  289. /pub/archie/clients/c-archie-1.3.2-vms.com
  290.  
  291. The x-archie client can be retrieved from ftp.x.org
  292. as contrib/xarchie-2.0.9.tar.Z
  293.  
  294. There is also a perl archie client, available from ftp.sura.net
  295. as pub/archie/clients/perl-archie-3.8.tar.Z
  296.  
  297. A NeXT archie client can be retrieved from ashley.cs.widener.edu as
  298. pub/archie/archie-NeXT.tar.Z
  299.  
  300. A mac archie client is available from 
  301. mac.archive.umich.edu as /mac/util/comm/anarchie1.00.sit.hqx
  302.  
  303. There appears to be a mac client available from 
  304. pprg.eece.unm.edu as /pub/Mac/sumex/comm
  305.  
  306.  
  307.   4.2 Interactive Interfaces
  308.   --- ----------- ----------
  309.  
  310. The interactive interface should be used only if the remote clients
  311. are unavailable.  Users can telnet to any archie site and login as archie.  
  312. On the host archie.sura.net, users can log in as qarchie, which provides 
  313. a faster interactive interface.
  314.  
  315.   4.3 Mail Interface
  316.   --- ---- ---------
  317.  
  318. Mail clients should be used as a last resort.  By sending e-mail to 
  319. archie@<archie-site> with the word help in the body or subject, users can
  320. receive a file which explains how to use the mail interface to archie.
  321.  
  322.  
  323. Appendix A: Regular Expressions
  324. -------- -- ------- -----------
  325.  
  326.   A.1 Overview
  327.   --- --------
  328.  
  329. Regular expressions are very powerful ways of describing filenames. 
  330. They allow the following features:
  331.  
  332.   * Forcing certain characters to be repeated exactly n times, or at least 
  333.     n times, where n >= 0
  334.  
  335.   * Specifying that a string should occur at the front or back or a 
  336.     matched filename
  337.  
  338.   * Specifying sets of characters which can match
  339.  
  340. The following characters are special in Archie regular expressions:
  341. . ^ * $ \ [ ]
  342.  
  343. The regular expressions used in Archie are known as ed regular expressions 
  344. because they were derived from the ed editor which is found on UNIX 
  345. workstations.  ed regular expressions are different from the file matching 
  346. expressions that are used at the command line.  Section 3.4.2 describes
  347. how to convert file matching expressions to archie regexps.
  348.  
  349.   A.2 Using Regular Expressions
  350.   --- ----- ------- -----------
  351.  
  352. Individually, many of these capabilities are not useful or can be better 
  353. handled as another type of search.   However, in combination they can 
  354. accurately specify the set of names desired, lowering the number of 
  355. useless matches.  I usually think about regular expressions as a series
  356. of pieces of a filename stuck together, allowing me to understand what
  357. filenames will be matched.
  358.  
  359.   A.3 Matching an arbitrary character
  360.   --- -------- -- --------- ---------
  361.  
  362. To match an arbitrary character, the . symbol is used.  For example the 
  363. regular expression ........  will match all filenames which have at least 
  364. eight characters in them, because Archie regular expressions match
  365. any part of a filename.  
  366.  
  367.   A.4 Matching something repeated multiple times
  368.   --- -------- --------- -------- -------- -----
  369.  
  370. A large amount of power in regular expressions comes from the ability to
  371. match a specified set of  characters repeated an arbitrary number of times.
  372. This is more powerful than file globs which cannot specify a set. The * 
  373. character means that the previous element in a regular expression should be 
  374. matched an arbitrary number of times. For example to match something which 
  375. has ctwm and tar in the filename, separated by some set of arbitrary 
  376. characters, the regular expression ctwm.*tar would be used.  To find the 
  377. versions of c2man which were archived from one of the comp.sources groups, 
  378. the regular expression c2man.*[0-9][0-9]* would be used. It would find all
  379. filenames with c2man in the string, followed by some or no characters, 
  380. followed by at least one digit.  This search would match filenames like 
  381. c2man-2.0.13.tar.gz, c2man-2.03, c2man-1.10.tar.Z
  382.  
  383.   A.5 Anchoring strings at the front or the back
  384.   --- --------- ------- -- --- ----- -- --- ----
  385.  
  386. To anchor a particular string to the front or the back of a matching
  387. filename, a ^ is put at the front or a $ at the back. For example, to find 
  388. zip file, the search string zip$ would be used.  To find filenames starting 
  389. with gdb, the string ^gdb would be used. These options can be combined, the 
  390. search string ^foo$ would match a file which has precisely the name foo. This 
  391. particular search would be better as an exact search because the results would 
  392. be returned faster, however a search for compressed versions of gcc, using the
  393. regexp ^gcc.*tar\.Z$ would be good uses of the power of regular expressions.
  394. In the earlier example of ........ , filenames of exactly eight characters
  395. could be matched using ^........$
  396.  
  397.   A.6 Matching a character out of a set of possibilities
  398.   --- -------- - --------- --- -- - --- -- ------------
  399.  
  400. There are two ways to specify characters to be matched. First as a list 
  401. of possibilities, and second as a list of unacceptable possibilities.
  402. To match any digit, the regular expression [0-9], which says match any 
  403. character from 0 to 9.  The expression [a-zA-Z] would match any alphabetic 
  404. character, and the expression [aeiou] would match any vowel.
  405. To match characters not in a set, the ^ character is placed after the left
  406. bracket.  To find a file which starts with tar, has some characters,
  407. then a non-alphabetic character, some characters and then tar, 
  408. the regular expression tar.*[^a-zA-Z].*tar could be used.
  409.  
  410.   A.7 Forcing special characters to be normal
  411.   --- ------- ------- ---------- -- -- ------
  412.  
  413. . ^ * $ \ [ ] are characters with special meanings in Archie 
  414. regular expressions.  To specify that these characters are exactly matched, 
  415. the special character needs to be escaped, by putting the \ character in 
  416. front of it. For example, the expression \.tar$ would find filenames ending
  417. in .tar, but the expression .tar$ could find filenames ending in ftar.
  418.  
  419.  
  420. Appendix B: Glossary
  421. -------- -- --------
  422.  
  423. anonymous ftp
  424.   Anonymous ftp is a way of accessing publicly available files.
  425.   Normally you would use the ftp command with the user name anonymous.
  426.   It is customary to give your e-mail address as the password so that people 
  427.   will know who is retrieving files; indeed, some sites require a valid
  428.   e-mail address before allowing you to retrieve files.
  429.  
  430. anchoring
  431.   Anchoring means forcing a section of a filename to match to either the 
  432.   front or the back of the filename, i.e. the string is anchored to the 
  433.   front[back] of the filename.
  434.  
  435. case
  436.   Upper(A-Z) or lower(a-z) case.  Case insensitive searches consider A to 
  437.   be equivalent to a, B to b, etc.
  438.  
  439. client
  440.   A program which runs on one machine and accesses a server to gather some
  441.   form of information
  442.  
  443. command line
  444.   Where commands are typed in to the prompt.  Usually the program that
  445.   receives the commands is called the shell.
  446.  
  447. compress
  448.   A program which removed redundancy producing a shorter output file.
  449.  
  450. diffs
  451.   Differences.  When a package is upgraded to a new version, authors usually
  452.   provide the differences between the old and new version of the package 
  453.   because the differences are smaller, and because by applying the differences
  454.   to their own copy of the sources, users are not forced to re-make any local 
  455.   changes.
  456.  
  457. ed
  458.   One of the first editors made available on unix workstations.  The 
  459.   regular expressions used in ed are very similar to the ones used in archie.
  460.  
  461. e-mail
  462.   Electronic Mail.  A common way of communicating across the Internet.
  463.  
  464. file globs
  465.   See file matching expressions.
  466.  
  467. file matching expressions (file globs)
  468.   Expressions that are typed into the shell at the command line to specify 
  469.   files.  File globs are useful for specifying multiple files.
  470.  
  471. host
  472.   see site
  473.  
  474. Internet
  475.   The Internet is the collection of hosts connected through the NSFnet 
  476.   backbone, which started as a DARPA project.  The Internet now reaches 
  477.   sites across the world.
  478.   
  479. package
  480.   A collection of files that make up a program.  Usually the sources to a
  481.   particular program, but the parts of a package can include data files,
  482.   binaries, etc.
  483.  
  484. regular expressions
  485.   A name for expressions which can be matched by finite automata, a "machine" 
  486.   with a finite number of states which can change from one state to another 
  487.   given a single character of input.
  488.  
  489. regexps
  490.   see regular expressions
  491.  
  492. shell
  493.   A program which parses file globs and executes programs.  Usually a shell
  494.   has other features such as input/output redirection, repeating, job
  495.   control, etc.  See also command line.
  496.  
  497. server
  498.   The part of a server-client system which receives requests from the client, 
  499.   processes those requests and returns the results to the client.  There is
  500.   an archie server running on the machines which provide archie service.
  501.  
  502. subcase
  503.   Case sensitive substring matches, which means that the filename matched must
  504.   have the same case as the search string.  See also substring and case.
  505.  
  506. substring
  507.   Case insensitive substring matches, which means that the filename matched 
  508.   can have any case relative to the search string provided that the letters
  509.   are the same.  See also subcase and case.
  510.  
  511. site
  512.   Usually a machine on the Internet, for example the anonymous ftp site
  513.   ftp.sura.net.  Sometimes generalized to mean a group of machines, 
  514.   for example the Carnegie Mellon site.
  515.  
  516. tar
  517.   A program which gathers a collection of files together into one file 
  518.   for transmission or storage.  tar preserves the names and subdirectories
  519.   of the gathered files.
  520.  
  521.  
  522.